#pragma once
#ifdef _MSVC_LANG
#pragma  execution_character_set("UTF-8")
#endif
#include "cglobalcore_global.h"
#include <QObject>
#include "myThreadPool.h"
class CGLOBALCORE_EXPORT ImageSaveHelper : public QObject
{
    Q_OBJECT
protected:
    explicit ImageSaveHelper(QObject* parent = nullptr);
public:
    static ImageSaveHelper* getInstance();
    ~ImageSaveHelper()override;
    void push_back(const QString& filepath, const QImage& img);
private:
    bool save_image(const QString& filepath, const QImage& img);
private:
    ThreadPool pool_;
};